The court will take cognisance of the chargesheet on August 6. At present, Rai is in judicial custody.
In his bail application, Kumar termed his custody "illegal" and urged the court to set him free.
The CBI did not oppose his bail petition.
The court set aside the direction issued to the CBI director to make a written apology to Patel for the agency's action against him.
Special Judge Santosh Snehi Mann passed the order on a petition filed by the CBI seeking revision of the order passed on Thursday by a magisterial court which also asked the agency to apologise to Patel.
The chargesheet, filed before Special Judge Santosh Snehi Mann, names six accused, including the former chief minister and his wife.
The court termed the offence as "grave" and noted that there were serious allegations about the involvement of public servants including the accused, who has been charged by the agency of being a part of an extortion racket being run in the garb of investigation.